package edu.kjxy.day02Synchronized.synNotExtends;

/**
 * 功能:
 * 作者:程序员欧阳子韩
 * 日期:2024/2/1 20:24
 */
public class Main {
    synchronized public void serviceMethod() {
        try {
            System.out.println("int main 下一步 sleep begin threadName=" +
                    Thread.currentThread().getName() + " time=" + System.currentTimeMillis());
            Thread.sleep(5000);
            System.out.println("int main 下一步 sleep end threadName=" +
                    Thread.currentThread().getName() + " time=" + System.currentTimeMillis());
        }catch (InterruptedException e){
            e.printStackTrace();
        }
    }
}
